unsigned long new_data_thresh;
uint32_t evt_mask;
uint32_t cpu_mask;
+ unsigned long tbuf_size;
} settings_t;
settings_t opts;
exit(EXIT_FAILURE);
}
- ret = xc_tbuf_enable(xc_handle, DEFAULT_TBUF_SIZE, mfn, size);
+ if(!opts.tbuf_size)
+ opts.tbuf_size = DEFAULT_TBUF_SIZE;
+
+ ret = xc_tbuf_enable(xc_handle, opts.tbuf_size, mfn, size);
if ( ret != 0 )
{
}
break;
+ case 'S': /* set tbuf size (given in pages) */
+ {
+ char *inval;
+ setup->tbuf_size = strtol(arg, &inval, 0);
+ if ( inval == arg )
+ argp_usage(state);
+ }
+ break;
+
case ARGP_KEY_ARG:
{
if ( state->arg_num == 0 )
.doc =
"set evt-mask " },
+ { .name = "trace-buf-size", .key='S', .arg="N",
+ .doc =
+ "Set trace buffer size in pages (default " xstr(DEFAULT_TBUF_SIZE) "). "
+ "N.B. that the trace buffer cannot be resized. If it has "
+ "already been set this boot cycle, this argument will be ignored." },
+
{0}
};